﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true"
    CodeFile="DepartmentInfo.aspx.cs" Inherits="BasicInfo_DepartmentInfo" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2.Linq, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript" src="../Scripts/ToChineseSpell.js"></script>
    <script language="javascript" type="text/javascript">

        function Show(Control) {
            popControlYjBm.ShowAtElement(Control);
        }
        function getAjax() {
            var bmbm = cbmbm.GetText();
            var bmmc = cbmmc.GetText();
            var bmmce = cbmmce.GetText();
            var bmsx = cbmsx.GetValue();
            var addr = caddr.GetText();
            var fax = cfax.GetText();
            var tel = ctel.GetText();
            var lxr = clxr.GetText();
            var flag = cflag.GetValue();

            $.ajax({
                type: "POST",
                url: "../Ashx/Department.ashx",
                data: { bmbm: bmbm, bmmc: bmmc, bmmce: bmmce, tel: tel, bmsx: bmsx, addr: addr, fax: fax, lxr: lxr, flag: flag },
                success: function (msg) {
                    if (bmbm == "") {
                        alert("请输入部门编码（两位数字）！");
                    }
                    else if (bmmc == "") {
                        alert("请输入部门名称！");
                    }
                    else {
                        if (msg == "success") {
                            alert("添加成功！");
                            QueryPanel.PerformCallback();
                            if (popControlYjBm.IsWindowVisible()) {
                                popControlYjBm.Hide();
                            }
                        }
                        else if (msg == "sorry") {
                            alert("对不起，部门编号不能重复！");
                            // popControlYjBm.Show();
                        }
                        else if (msg == "two") {
                            alert("输入的编码长度必须为两位！");
                            // popControlYjBm.Show();
                        }
                    }

                }
            });
        }
        function Yjbm() {
            if (popControlYjBm.IsWindowVisible()) {
                popControlYjBm.Hide();
            }
        }
        function addYjBm() {
            if (popControlYjBm.IsWindowVisible()) {
                noty({ "text": "添加成功！",
                    "layout": "top",
                    "type": "success",
                    "animateOpen": { "height": "toggle" },
                    "animateClose": { "height": "toggle" },
                    "speed": 500,
                    "timeout": 1000,
                    "closeButton": false,
                    "closeOnSelfClick": true,
                    "closeOnSelfOver": false
                });
                popControlYjBm.Hide();
            }
            else {
                popControlYjBm.Show();
            }
        }
        function CbUser(id) {
            list.SelectAllRowsOnPage(false);
            labbmbm.SetText(id);
            $.ajax({
                type: "Post",
                url: "DepartmentInfo.aspx/GetUsers",
                data: "{'bmbm': '" + id + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    list.SelectRowsByKey(data.d);
                },
                error: function (err) {
                    //alert("关联人员获取失败,请重试！");
                    noty({ "text": "关联人员获取失败,请重试！",
                        "layout": "top",
                        "type": "error",
                        "animateOpen": { "height": "toggle" },
                        "animateClose": { "height": "toggle" },
                        "speed": 500,
                        "timeout": 1000,
                        "closeButton": false,
                        "closeOnSelfClick": true,
                        "closeOnSelfOver": false
                    });
                }
            });
        }
        function ShowUser() {
            if (pupControl.IsWindowVisible()) {
                //alert("保存成功！");
                noty({ "text": "负责人保存成功！",
                    "layout": "top",
                    "type": "success",
                    "animateOpen": { "height": "toggle" },
                    "animateClose": { "height": "toggle" },
                    "speed": 500,
                    "timeout": 1000,
                    "closeButton": false,
                    "closeOnSelfClick": true,
                    "closeOnSelfOver": false
                });
                pupControl.Hide()
            }
            else {
                pupControl.Show();
            }
        }

     
    </script>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainContent">
    <h3 class="DemoTitle">
        部门基本信息管理
    </h3>
    <div id="DemoArea">
        <a href="#" onclick="javascript:Show(this)">添加一级部门</a>
        <dx:ASPxTreeList ID="DXTreelist" runat="server" Width="100%" AutoGenerateColumns="False"
            ParentFieldName="fbmbm" KeyFieldName="bmbm" OnNodeUpdating="DXTreelist_NodeUpdating"
            ClientInstanceName="QueryTree" OnNodeDeleting="DXTreelist_NodeDeleting" OnNodeInserting="DXTreelist_NodeInserting"
            OnCustomDataCallback="DXTreelist_CustomDataCallback" OnCellEditorInitialize="DXTreelist_CellEditorInitialize"
            Style="margin-top: 2px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
            CssPostfix="Office2010Blue">
            <%--
                         CustomDataCallback="function(s, e) { 
                         var key = QueryTree.GetFocusedNodeKey();
                         cssbm.SetText(e.result);
                         cfbmbm.SetText(key);
                         cbmbms.SetText(key);
                         if(key.length==0)
                         {
                            cssbm.innerHTML = '请选择上级部门';
                         }

                        }"--%>
            <SettingsBehavior AutoExpandAllNodes="True" AllowFocusedNode="True"></SettingsBehavior>
            <SettingsEditing Mode="EditFormAndDisplayNode"></SettingsEditing>
            <SettingsText ConfirmDelete="确定要删除吗？" CommandEdit="编辑" CommandDelete="删除" CommandUpdate="更新"
                CommandCancel="关闭" RecursiveDeleteError="该节点有子节点，请先删除其子节点"></SettingsText>
            <ClientSideEvents FocusedNodeChanged="function(s, e) { 
                        var key = QueryTree.GetFocusedNodeKey();
                        QueryTree.PerformCustomDataCallback(key); 
                        }"></ClientSideEvents>
            <Columns>
                <dx:TreeListTextColumn FieldName="bmbm" ShowInCustomizationForm="True" VisibleIndex="0"
                    Caption="部门编码" Name="t_fbmbm" Width="150px">
                    <PropertiesTextEdit NullText="注意：编码为两位数字" Width="300px">
                        <ValidationSettings ErrorDisplayMode="ImageWithText">
                            <RequiredField IsRequired="True" ErrorText="输入编码为两位" />
                        </ValidationSettings>
                    </PropertiesTextEdit>
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn FieldName="bmmc" ShowInCustomizationForm="True" VisibleIndex="1"
                    Caption="部门名称" Name="t_bmmc" Width="150px">
                    <PropertiesTextEdit Width="300px">
                        <ValidationSettings ErrorDisplayMode="ImageWithText">
                            <RequiredField IsRequired="True" ErrorText="请输入部门名称" />
                        </ValidationSettings>
                    </PropertiesTextEdit>
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn FieldName="bmmce" ShowInCustomizationForm="True" VisibleIndex="2"
                    Caption="部门名称英" Name="t_bmmce" Width="150px">
                    <PropertiesTextEdit Width="300px">
                    </PropertiesTextEdit>
                </dx:TreeListTextColumn>
                <%--<dx:TreeListTextColumn FieldName="fbmbm" ShowInCustomizationForm="True" VisibleIndex="5"
                    Caption="上级部门编码" Name="t_fbmbm">
                </dx:TreeListTextColumn>--%>
                <dx:TreeListComboBoxColumn Caption="部门属性" FieldName="bmsx" Name="t_bmsx" VisibleIndex="3"
                    Width="150px">
                    <PropertiesComboBox ValueType="System.String" Spacing="0" Width="300px">
                        <Items>
                            <dx:ListEditItem Text="总部" Value="Z" />
                            <dx:ListEditItem Selected="True" Text="连锁店" Value="L" />
                        </Items>
                    </PropertiesComboBox>
                </dx:TreeListComboBoxColumn>
                <dx:TreeListTextColumn FieldName="tel" ShowInCustomizationForm="True" VisibleIndex="4"
                    Caption="电话" Name="t_tel" Width="200px">
                    <PropertiesTextEdit Width="300px">
                    </PropertiesTextEdit>
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn FieldName="fax" ShowInCustomizationForm="True" VisibleIndex="5"
                    Caption="传真" Name="t_fax" Width="150px">
                    <PropertiesTextEdit Width="300px">
                    </PropertiesTextEdit>
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn FieldName="lxr" ShowInCustomizationForm="True" VisibleIndex="6"
                    Caption="联系人" Name="t_lxr" Width="150px">
                    <PropertiesTextEdit Width="300px">
                    </PropertiesTextEdit>
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn Caption="地址" FieldName="addr" Name="t_addr" VisibleIndex="7"
                    Width="200px">
                    <PropertiesTextEdit Width="300px">
                    </PropertiesTextEdit>
                </dx:TreeListTextColumn>
                <dx:TreeListComboBoxColumn Caption="状态" FieldName="flag" Name="t_flag" VisibleIndex="8">
                    <PropertiesComboBox Spacing="0" ValueType="System.String" Width="300px">
                        <Items>
                            <dx:ListEditItem Selected="True" Text="活动" Value="A" />
                            <dx:ListEditItem Text="暂停" Value="P" />
                        </Items>
                    </PropertiesComboBox>
                </dx:TreeListComboBoxColumn>
                <dx:TreeListTextColumn Caption="负责人" Name="t_fzr" Width="100px" VisibleIndex="9">
                    <PropertiesTextEdit Width="300px">
                    </PropertiesTextEdit>
                    <EditFormSettings Visible="False"></EditFormSettings>
                    <DataCellTemplate>
                        <a href="javascript:CbUser(' <%# Eval("bmbm")%> ');">负责人</a>
                    </DataCellTemplate>
                </dx:TreeListTextColumn>
                <dx:TreeListCommandColumn Caption="操作" Name="commd" VisibleIndex="10">
                    <EditButton Text="编辑" Visible="True">
                    </EditButton>
                    <NewButton Visible="True" Text="新增">
                    </NewButton>
                    <DeleteButton Text="删除" Visible="True">
                    </DeleteButton>
                </dx:TreeListCommandColumn>
                <dx:TreeListTextColumn FieldName="fbmbm" Name="t_fbmbm" Visible="False" VisibleIndex="11">
                    <EditFormSettings Visible="False" />
                </dx:TreeListTextColumn>
            </Columns>
            <Settings SuppressOuterGridLines="True" />
            <SettingsBehavior AllowFocusedNode="True" AutoExpandAllNodes="True" />
            <SettingsEditing Mode="EditFormAndDisplayNode" />
            <SettingsText CommandCancel="关闭" CommandDelete="删除" CommandEdit="编辑" CommandUpdate="更新"
                ConfirmDelete="确定要删除吗？" RecursiveDeleteError="该节点有子节点，请先删除其子节点" />
            <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                <LoadingPanel Url="~/App_Themes/Office2010Blue/TreeList/Loading.gif">
                </LoadingPanel>
            </Images>
            <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <StylesPager>
                <PageNumber ForeColor="#3E4846">
                </PageNumber>
                <Summary ForeColor="#1E395B">
                </Summary>
            </StylesPager>
            <StylesEditors ButtonEditCellSpacing="0">
            </StylesEditors>
            <ClientSideEvents FocusedNodeChanged="function(s, e) { 
                        var key = QueryTree.GetFocusedNodeKey();
                        QueryTree.PerformCustomDataCallback(key); 
                        }" />
        </dx:ASPxTreeList>
    </div>
    <dx:ASPxPopupControl ID="pupControl" runat="server" ClientInstanceName="pupControl"
        Width="450px" AllowResize="True" HeaderText="部门负责人" PopupVerticalAlign="WindowCenter"
        PopupHorizontalAlign="WindowCenter" CloseAction="CloseButton" Modal="True" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
        CssPostfix="Office2010Blue" EnableHotTrack="False" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
        </LoadingPanelImage>
        <LoadingPanelStyle ImageSpacing="5px">
        </LoadingPanelStyle>
        <ContentCollection>
            <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                <table>
                    <tr>
                        <td>
                            部门编码：
                        </td>
                        <td>
                            <%-- <dx:ASPxLabel ID="cbmbm" runat="server" ClientInstanceName="cbmbm" Text="">
                            </dx:ASPxLabel>--%>
                            <dx:ASPxLabel ID="labbmbm" runat="server" ClientInstanceName="labbmbm" Text="ASPxLabel">
                            </dx:ASPxLabel>
                        </td>
                    </tr>
                </table>
                <dx:ASPxGridView ID="gvUserList" runat="server" Width="100%" AutoGenerateColumns="False"
                    ClientInstanceName="list" DataSourceID="LSMDSourceMainUsers" KeyFieldName="rybm"
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                    OnCustomCallback="gvUserList_CustomCallback">
                    <Columns>
                        <dx:GridViewCommandColumn ShowInCustomizationForm="True" ShowSelectCheckbox="True"
                            VisibleIndex="0">
                            <HeaderTemplate>
                                <input type="checkbox" onclick="list.SelectAllRowsOnPage(this.checked);" title="全选或取消" />
                            </HeaderTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ClearFilterButton Visible="True">
                            </ClearFilterButton>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn Caption="人员编码" FieldName="rybm" Name="t_rybm" ReadOnly="True"
                            ShowInCustomizationForm="True" VisibleIndex="0">
                            <EditFormSettings CaptionLocation="Near" />
                            <CellStyle HorizontalAlign="Left">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="人员姓名" FieldName="ryxm" Name="t_ryxm" ShowInCustomizationForm="True"
                            VisibleIndex="1">
                            <EditFormSettings CaptionLocation="Near" />
                            <CellStyle HorizontalAlign="Left">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <Settings ShowFilterRow="true" ShowGroupPanel="false" />
                    <Settings ShowVerticalScrollBar="true" />
                    <ClientSideEvents EndCallback="ShowUser" />
                    <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </Images>
                    <ImagesFilterControl>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                        </Header>
                        <LoadingPanel ImageSpacing="5px">
                        </LoadingPanel>
                    </Styles>
                    <StylesPager>
                        <PageNumber ForeColor="#3E4846">
                        </PageNumber>
                        <Summary ForeColor="#1E395B">
                        </Summary>
                    </StylesPager>
                    <StylesEditors ButtonEditCellSpacing="0">
                        <ProgressBar Height="21px">
                        </ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>
                <table width="100%">
                    <tr>
                        <td align="right">
                            <dx:ASPxButton ID="BtnUser" runat="server" Font-Size="10pt" Text="保存" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                Width="60px" AutoPostBack="false" UseSubmitBehavior="false">
                                <ClientSideEvents Click="function(s,e){
                                list.PerformCallback(labbmbm.GetText());
                                }" />
                            </dx:ASPxButton>
                        </td>
                    </tr>
                </table>
            </dx:PopupControlContentControl>
        </ContentCollection>
    </dx:ASPxPopupControl>
    <dx:LinqServerModeDataSource ID="LSMDSourceMainDeparts" runat="server" ContextTypeName="DAL.DataClassesDataContext"
        EnableDelete="True" EnableInsert="True" EnableUpdate="True" TableName="css_department" />
    <dx:LinqServerModeDataSource ID="LSMDSourceMainUsers" runat="server" ContextTypeName="DAL.DataClassesDataContext"
        TableName="css_user" />
    <dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" Width="650px" ClientInstanceName="popControlYjBm"
        HeaderText="添加一级部门" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
        CssPostfix="Office2010Blue" EnableHotTrack="False" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
        Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter"
        AllowResize="True" CloseAction="CloseButton" AllowDragging="True">
        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
        </LoadingPanelImage>
        <LoadingPanelStyle ImageSpacing="5px">
        </LoadingPanelStyle>
        <ContentCollection>
            <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                <dx:ASPxCallbackPanel ID="pupYj" runat="server" ClientInstanceName="QueryPanel" Width="100%"
                    OnCallback="pupYj_Callback">
                    <PanelCollection>
                        <dx:PanelContent runat="server">
                            <table width="100%">
                                <%-- <tr>
                        <td>
                            所属部门：
                        </td>
                        <td>
                            <span id="txtcityshow">
                                <dx:ASPxLabel ID="lblssbm" runat="server" ClientInstanceName="cssbm" Text="">
                                </dx:ASPxLabel>
                            </span>
                        </td>
                        <td>
                            上级部门编号：
                        </td>
                        <td>
                            <dx:ASPxLabel ID="lblfbmbm" ClientInstanceName="cfbmbm" runat="server" Text="">
                            </dx:ASPxLabel>
                        </td>
                    </tr>--%>
                                <tr>
                                    <td class="style1">
                                        部门编号：
                                    </td>
                                    <td class="style1">
                                        <%--<div style="float: left">
                                <dx:ASPxLabel ID="lblbmbm" runat="server" Text="" Width="100" ClientInstanceName="cbmbms">
                                </dx:ASPxLabel>
                            </div>--%>
                                        <div style="float: left">
                                            <dx:ASPxTextBox ID="txtbmbm" ClientInstanceName="cbmbm" runat="server" Width="200px"
                                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" NullText="注意：编码为两位数字">
                                            </dx:ASPxTextBox>
                                        </div>
                                        <%--  <div style="float: left">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                                                ControlToValidate="txtbmbm"></asp:RequiredFieldValidator></div>--%>
                                    </td>
                                    <td class="style1">
                                        部门名称：
                                    </td>
                                    <td class="style1">
                                        <div style="float: left">
                                            <dx:ASPxTextBox ID="txtbmmc" ClientInstanceName="cbmmc" runat="server" Width="200px"
                                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            </dx:ASPxTextBox>
                                        </div>
                                        <%-- <div style="float: left">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                                                ControlToValidate="txtbmmc"></asp:RequiredFieldValidator></div>--%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        部门名称英：
                                    </td>
                                    <td>
                                        <span id="Span1">
                                            <dx:ASPxTextBox ID="txtbmmce" ClientInstanceName="cbmmce" runat="server" Width="200px"
                                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            </dx:ASPxTextBox>
                                        </span>
                                    </td>
                                    <td>
                                        部门属性：
                                    </td>
                                    <td>
                                        <dx:ASPxComboBox ID="cmdbmsx" runat="server" Width="200px" ClientInstanceName="cbmsx"
                                            SelectedIndex="1" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                            Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            <Items>
                                                <dx:ListEditItem Text="总部" Value="Z" />
                                                <dx:ListEditItem Text="连锁店" Value="L" Selected="True" />
                                            </Items>
                                            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                            </LoadingPanelImage>
                                            <LoadingPanelStyle ImageSpacing="5px">
                                            </LoadingPanelStyle>
                                            <ButtonStyle Width="13px">
                                            </ButtonStyle>
                                        </dx:ASPxComboBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        传真：
                                    </td>
                                    <td>
                                        <span id="Span3">
                                            <dx:ASPxTextBox ID="txtfax" ClientInstanceName="cfax" runat="server" Width="200px"
                                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            </dx:ASPxTextBox>
                                        </span>
                                    </td>
                                    <td>
                                        联系人：
                                    </td>
                                    <td>
                                        <dx:ASPxTextBox ID="txtlxr" runat="server" ClientInstanceName="clxr" Width="200px"
                                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                        </dx:ASPxTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        地址：
                                    </td>
                                    <td>
                                        <span id="Span4">
                                            <dx:ASPxTextBox ID="txtaddr" ClientInstanceName="caddr" runat="server" Width="200px"
                                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            </dx:ASPxTextBox>
                                        </span>
                                    </td>
                                    <td>
                                        状态：
                                    </td>
                                    <td>
                                        <dx:ASPxComboBox ID="cmdflag" ClientInstanceName="cflag" runat="server" Width="200px"
                                            SelectedIndex="0" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                            Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            <Items>
                                                <dx:ListEditItem Text="活动" Value="A" Selected="True" ImageUrl="~/Images/icon/A.png" />
                                                <dx:ListEditItem Text="暂停" Value="P" ImageUrl="~/Images/icon/Z.png" />
                                            </Items>
                                            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                            </LoadingPanelImage>
                                            <LoadingPanelStyle ImageSpacing="5px">
                                            </LoadingPanelStyle>
                                            <ButtonStyle Width="13px">
                                            </ButtonStyle>
                                        </dx:ASPxComboBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        电话：
                                    </td>
                                    <td colspan="3">
                                        <dx:ASPxTextBox ID="txttel" runat="server" ClientInstanceName="ctel" Width="200px"
                                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                        </dx:ASPxTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" colspan="4">
                                        <dx:ASPxButton ID="btnAdd" runat="server" Text="添加" AutoPostBack="false" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                            CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            <%--  <ClientSideEvents Click="function(s,e){QueryPanel.PerformCallback();}" />--%>
                                            <ClientSideEvents Click="function(s,e){getAjax();}" />
                                        </dx:ASPxButton>
                                    </td>
                                </tr>
                            </table>
                        </dx:PanelContent>
                    </PanelCollection>
                    <%-- <ClientSideEvents EndCallback="addYjBm" />--%>
                </dx:ASPxCallbackPanel>
            </dx:PopupControlContentControl>
        </ContentCollection>
    </dx:ASPxPopupControl>
</asp:Content>
